<%@ page language="java" pageEncoding="utf-8" contentType="text/html; charset=utf-8"%>
<%@ taglib prefix="ww" uri="webwork" %>
<ww:bean name="'com.css.apps.base.dict.service.DictMan'" id="dictID" />
<ww:bean name="'com.css.apps.base.user.model.SUser'" id="dictPost" />
<ww:bean name="'com.css.apps.base.post.service.SPostItem'" id="postID" />
<form class="form-horizontal table-form" name="userdevForm" id="userdevForm" method="post" action="dirUserDev.action" onsubmit="return $action.query(this)">
  	<input type="hidden" name="page.orderFlag" id="page.orderFlag" class="order-flag" value="<ww:property value='page.orderFlag'/>"> 
	<input type="hidden" name="page.orderString" id="page.orderString" class="order-string" value="<ww:property value='page.orderString'/>">
	<input type="hidden" name="page.pageSize" id="page.pageSize" class="page-size" value="<ww:property value='page.pageSize'/>">
	<input type="hidden" name="page.totalPages" id="page.totalPages" class="page-count" value="<ww:property value='page.totalPages'/>">
	<input type="hidden" name="page.currentPage" id="page.currentPage" class="page-current" value="<ww:property value='page.currentPage'/>">
  	<input type="hidden" name="userId" id="userId" value="<ww:property value="userId"/>">
	<div class="table-header">
	<div class="table-search">
		<ul>
			<li>设备类型：<ww:select attributes="class='input-medium'" name="'deviceType'" id="openFlag" value="deviceType"  list="#dictID.getDictListQuery('d_device_type')" listKey="code" listValue="name"></ww:select> </li>
            <li>登录状态：<ww:select attributes="class='input-small'" name="'loginStatus'" id="loginStatus" value="loginStatus"  list="#dictID.getDictListQuery('d_login_status')" listKey="code" listValue="name"></ww:select> </li>
           	<li>删除状态：<ww:select attributes="class='input-small'" name="'delFlag'" id="delFlag" value="delFlag"  list="#dictID.getDictListQuery('d_truefalse')" listKey="code" listValue="name"></ww:select> </li>
            <li><span class="txt">最后登录时间：</span>
			  <input type="text" class="input-small Wdate" id="beginLastLoginTime" name="beginLastLoginTime"onclick="WdatePicker({dateFmt:'yyyy-MM-dd',maxDate:'#F{$dp.$D(\'endLastLoginTime\')}'})" value='<ww:property value="new java.text.SimpleDateFormat('yyyy-MM-dd').format(beginLastLoginTime)"/>'><span class="mar">到</span>
			  <input type="text" class="input-small Wdate" id="endLastLoginTime" name="endLastLoginTime" onclick="WdatePicker({dateFmt:'yyyy-MM-dd',minDate:'#F{$dp.$D(\'beginLastLoginTime\')}'})" value='<ww:property value="new java.text.SimpleDateFormat('yyyy-MM-dd').format(endLastLoginTime)"/>'></li>
			</li>
            <li><ww:button css="btn green" caption="查询" funcode="acl_user/dirUserDev" type="submit"></ww:button></li>
		</ul>
	</div>
	<div class="table-btn">
			<div class="btn-group">
				<ww:link funcode="acl_user/delUserDev" css="btn" caption="批量删除" onclick="$action.execBatch(this,{url:'delUserDev.action',title:'将删除设备项，确认删除?'});"></ww:link>
			</div>
			<div class="btn-group">
				<ww:link funcode="acl_user/updUserDev" css="btn" caption="批量下线" onclick="$action.execBatch(this,{url:'updUserDev.action',title:'确认下线?'});"></ww:link>
			</div>
	</div>
	<table class="table table-bordered">
		<thead>
			<tr>
				<th width="25px"><input group="ids" class="cleck-all" type="checkbox"/></th>
				<th width="120px">操作</th>
   	 	    <th width="150px" order-field="deviceModel" class="order">设备名称</th>
   	 	    <th width="150px" order-field="deviceType" class="order">设备类型</th>
     	 	<th width="150px" order-field="deviceVendor" class="order">设备厂商</th>
     	 	<th width="150px" order-field="osName" class="order">操作系统</th>
     	 	<th width="150px" order-field="osVersion" class="order">操作系统版本号</th>
     	 	<th width="150px" order-field="loginStatus" class="order">登录状态</th>
     	 	<th width="150px" order-field="delFlag" class="order">删除状态</th>
     	 	<th width="200px" order-field="lastLoginTime" class="order">最后登录时间</th>
     	 	<!--  <th width="150px" order-field="phone" class="order">电话</th>-->
			</tr>
		</thead>
		<tbody>
		  <ww:iterator value="page.results" id="data" status="data">
			<tr>
				<td class="text-center"><input type="checkbox"  name="ids" id="ids" value="<ww:property value="uuid" />"/></td>
				<td class="text-center">
					<ww:if test="delFlag==2"><ww:link funcode="acl_user/delUserDev" caption="删除" onclick="$action.exec(this,{url:'delUserDev.action?ids=%{uuid}',title:'将删除用户设备，确认删除?'})" style="display:inline-block;" href="javascript:;" ></ww:link></ww:if>
					<ww:else><ww:link funcode="acl_user/setUnDelUserDev" caption="还原" onclick="$action.exec(this,{url:'setUnDelUserDev.action?ids=%{uuid}',title:'将还原用户设备，确认还原?'})" style="display:inline-block;" href="javascript:;" ></ww:link></ww:else>
					<ww:if test="loginStatus==1"><ww:link funcode="acl_user/updUserDev" caption="下线" onclick="$action.exec(this,{url:'updUserDev.action?ids=%{uuid}',title:'确认用户设备下线?'})" style="display:inline-block;" href="javascript:;" ></ww:link></ww:if>				
					<ww:else>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</ww:else>
				</td>
					<td class="text-center"><ww:property value="deviceModel"/></td>
					<td class="text-center"><ww:property value="#dictID.getDictType('d_device_type', deviceType).name"/></td>
					<td class="text-center"><ww:property value="deviceVendor"/></td>
					<td class="text-center"><ww:property value="osName"/></td>
					<td class="text-center"><ww:property value="osVersion"/></td>
					<td class="text-center"><ww:property value="#dictID.getDictType('d_login_status', loginStatus).name"/></td>
					<td class="text-center"><ww:property value="#dictID.getDictType('d_truefalse', delFlag).name"/></td>
					<td class="text-center"><ww:property value="new java.text.SimpleDateFormat('yyyy-MM-dd HH:mm:ss').format(lastLoginTime)"/></td>
			</ww:iterator>
		</tbody>
	</table>
	<div class="pagination"><ww:property value="page.pageSplit"/></div>
</form>

